﻿using System;

namespace RTools_NTS.Util
{
	public abstract class StringToken : Token
	{
		public StringToken(string s) : base(0)
		{
			this.obj = s;
		}

		public StringToken(string s, int line) : base(line)
		{
			this.obj = s;
		}

		public override string ToDebugString()
		{
			return base.GetType().Name + ":'" + (string)this.obj + "'";
		}

		public override string ToString()
		{
			return (string)this.obj;
		}

		public override string StringValue
		{
			get
			{
				return (string)this.obj;
			}
		}

		public override int GetHashCode()
		{
			return this.ToString().GetHashCode();
		}
	}
}
